home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / acodet1a / mdiform1.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1998-06-25  |  2.5 KB  |  78 lines

  1. VERSION 5.00
  2. Begin VB.MDIForm MDIForm1 
  3.    BackColor       =   &H8000000C&
  4.    Caption         =   "MDIForm1"
  5.    ClientHeight    =   5865
  6.    ClientLeft      =   165
  7.    ClientTop       =   735
  8.    ClientWidth     =   7410
  9.    LinkTopic       =   "MDIForm1"
  10.    StartUpPosition =   3  'Windows Default
  11.    Begin VB.PictureBox Picture2 
  12.       Align           =   3  'Align Left
  13.       BorderStyle     =   0  'None
  14.       Height          =   5865
  15.       Left            =   2430
  16.       MousePointer    =   9  'Size W E
  17.       ScaleHeight     =   5865
  18.       ScaleWidth      =   45
  19.       TabIndex        =   1
  20.       Top             =   0
  21.       Width           =   45
  22.    End
  23.    Begin VB.PictureBox Picture1 
  24.       Align           =   3  'Align Left
  25.       BorderStyle     =   0  'None
  26.       Height          =   5865
  27.       Left            =   0
  28.       MousePointer    =   9  'Size W E
  29.       ScaleHeight     =   5865
  30.       ScaleWidth      =   2430
  31.       TabIndex        =   0
  32.       Top             =   0
  33.       Visible         =   0   'False
  34.       Width           =   2430
  35.    End
  36.    Begin VB.Menu mnuFile 
  37.       Caption         =   "&File"
  38.       Begin VB.Menu mnuFExit 
  39.          Caption         =   "E&xit"
  40.       End
  41.    End
  42. Attribute VB_Name = "MDIForm1"
  43. Attribute VB_GlobalNameSpace = False
  44. Attribute VB_Creatable = False
  45. Attribute VB_PredeclaredId = True
  46. Attribute VB_Exposed = False
  47. Option Explicit
  48. Private Sub MDIForm_Load()
  49.     'Show the two forms
  50.     Form1.Show
  51.     Form2.Show
  52. End Sub
  53. Private Sub MDIForm_Unload(Cancel As Integer)
  54.     'unload Form1 so we terminate
  55.     Unload Form1
  56. End Sub
  57. Private Sub Picture1_Resize()
  58.     'check size
  59.     If Picture1.Width < 120 Then
  60.         Picture1.Width = 120
  61.     End If
  62.     'if Form1 is docked, position it so its resizing border is hidden
  63.     'outside the confines of Picture1.
  64.     If Form1.bDocked Then
  65.         Form1.Move -4 * Screen.TwipsPerPixelX, -4 * Screen.TwipsPerPixelY, Picture1.ScaleWidth + (8 * Screen.TwipsPerPixelX), Picture1.ScaleHeight + (8 * Screen.TwipsPerPixelY)
  66.     End If
  67. End Sub
  68. Private Sub Picture2_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  69.     'As a simple alternative to using a splitter control we can resize
  70.     'Picture1 by sending a message that will make windows draw a
  71.     'resizing border for us.
  72.     If Picture1.Visible Then
  73.         ReleaseCapture 'need to do this or SendMessage fails
  74.         'Send message to start resizing picture1
  75.         SendMessage Picture1.hwnd, WM_NCLBUTTONDOWN, HTRIGHT, ByVal &O0
  76.     End If
  77. End Sub
  78.